macro(ADD_EXAMPLE name)
    add_executable(example_${name} example_${name}.f90)
    target_link_libraries(example_${name} "${PROJECT_NAME}")
    add_test(NAME ${name}
             COMMAND $<TARGET_FILE:example_${name}> ${CMAKE_CURRENT_BINARY_DIR}
             WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
endmacro(ADD_EXAMPLE)

add_subdirectory(array)
add_subdirectory(ascii)
add_subdirectory(bitsets)
add_subdirectory(error)
add_subdirectory(hashmaps)
add_subdirectory(hash_procedures)
add_subdirectory(io)
add_subdirectory(linalg)
add_subdirectory(logger)
add_subdirectory(math)
add_subdirectory(optval)
add_subdirectory(quadrature)
add_subdirectory(random)
add_subdirectory(selection)
add_subdirectory(sorting)
add_subdirectory(specialfunctions_gamma)
add_subdirectory(stats)
add_subdirectory(stats_distribution_exponential)
add_subdirectory(stats_distribution_normal)
add_subdirectory(stats_distribution_uniform)
add_subdirectory(stringlist_type)
add_subdirectory(strings)
add_subdirectory(string_type)
add_subdirectory(version)
